package jdbc;

import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;

public class Test {
    public static void main(String[] args) {
        try (
                Connection con=DBUtil.getConnection();
                ){
            Statement stm = con.createStatement();
            String sql ="CREATE TABLE article(\n" +
                    "    id INT PRIMARY KEY AUTO_INCREMENT,\n" +
                    "    title VARCHAR(200),\n" +
                    "    content VARCHAR(1000)\n" +
                    ")";
            stm.execute(sql);
            System.out.println("创建成功");

        } catch (SQLException e) {
            e.printStackTrace();
        }
    }
}
